c###fobby.for
      SUBROUTINE FOBBY(K)
C--------------------------------
C
C     THIS ROUTINE CALCULATES OBLIQUE FREQUENCIES FOR REFLECTRIX (KHZ)
C
C     THE SIZE OF THE TABLE IS REDUCED BY CALCULATION OF NANG IN
C     SUBROUTINE SANG
C
C--------------------------------
      COMMON /DON /ALATD, AMIN, AMIND, BTR, BTRD, DLONG, DMP, ERTR, GCD,
     1 GCDKM, PMP, PWR, TLAT, TLATD, TLONG, TLONGD, RSN, SIGTR, RLAT,
     2 RLATD,RLONG,RLONGD,BRTD,FLUX,ULAT,ULATD,ULONG,ULONGD,SSN,D90R,
     3 D50R,D10R,D90S,D50S,D10S
      COMMON / ALPHA / IMON(12), ITRAN(2), IRCVR(2), LBMAP(2), MODE(13),
     A MODER(13), ITLAT, ITLONG, IRLAT, IRLONG, IRLATU, IRLONGU, NYEAR
      CHARACTER IMON*3, NYEAR*5, ITRAN*10, IRCVR*10, LBMAP*10, ITLAT*1,
     A ITLONG*1, IRLAT*1, IRLONG*1, IRLATU*1, IRLONGU*1, MODE*2, MODER*2

ccc      COMMON / ALPHA / IMON(12), IRCVR(2), ITRAN(2), MODE(13),
ccc     A MODER(13), IRLAT, IRLONG, ITLAT, ITLONG, NYEAR
ccc      CHARACTER IMON*3,  IRCVR*10, ITRAN*10,MODE*2, MODER*2,
ccc     1 IRLAT*1, IRLONG*1, ITLAT*1, ITLONG*1,NYEAR*5

      COMMON / SSP / SUN(2,12), MONTH
      COMMON / TIME / IT, GMT, UTIME(24), GMTR, XLMT(24), ITIM, JTX
      COMMON /CON /D2R, DCL, GAMA, PI, PI2, PIO2, R2D, RZ, VOFL
      COMMON /RON /CLAT(5), CLONG(5), GLAT(5), RD(5), FI(3,5), YI(3,5),
     1HI(3,5), HPRIM(30,5), HTRUE(30,5), FVERT(30,5),KM,KFX, AFAC(30,5),
     2HTR(50,3), FNSQ(50,3)
      COMMON/RAYS/ANG(40),IFOB(40,30,5),NANG
      COMMON/INFORM/INFO,IHSHR,IHLNG
ccc      write(72,1) k,d2r,rz
ccc1     format(' in fobby, k,d2r,rz=',i5,2e15.7)
      DO 650 IA=1,NANG
ccc      write(72,'('' ia='',i5)') ia
      DEL = ANG (IA) * D2R
      RCOSD = RZ * COS (DEL)
      DO 645 IH = 1, 30
ccc      write(72,'('' ih='',i5)') ih
      FV = FVERT (IH, K)
C.....TRUE HEIGHT SO NO K FACTOR
      SPHE = RCOSD / (RZ + HTRUE (IH, K))
      SQCOS = 1. - SPHE * SPHE
      SQCOS = AMAX1 (.000001, SQCOS)
      CPHE = SQRT (SQCOS)
      FREQ = FV / CPHE
      IFOB (IA, IH, K) = 1000. * FREQ
  645 CONTINUE
  650 CONTINUE
      RETURN
      END
C--------------------------------
